package com.teampower.idea.service.impl;

import java.util.List;

import com.teampower.idea.dao.UsersDAO;
import com.teampower.idea.pojo.Users;
import com.teampower.idea.service.UsersService;

public class UsersServiceImpl implements UsersService {
	
	private UsersDAO usersDAO;
	
	public UsersDAO getusersDAO() {
		return usersDAO;
	}
	public void setusersDAO(UsersDAO usersDAO) {
		this.usersDAO = usersDAO;
	}

	//登录判断
	public Users load(String username,String password) {
		return usersDAO.load(username,password);
	}
	//注册判断
	public Users load(String username) {
		return usersDAO.load(username);
	}
	//用户注册
	public void save(Users users) {
		usersDAO.save(users);
	}
	//查询总记录数
	public int getCounts() {
		return usersDAO.getCounts();
	}
	//分页查询
	public List getAll(int index,int pageSize) {
		return usersDAO.getAll(index,pageSize);
	}

}
